<template>
	<view class="address">
		<view class=""><uni-icons type="location" size="30rpx"></uni-icons></view>
		<view class=""><text class="address_text">{{address}}</text></view>
		
		
	</view>
</template>

<script>
	
	export default {
		name:"addressBar",
		props:{
			wordCount:{
				type:Number,
				default:16
			}
		},
		data() {
			return {
				
			};
		},
		computed:{
			address(){
				const str= this.$store.state.msg.address
				return str.length > this.wordCount ? `${str.substring(0, this.wordCount)}...` : str;
			}
			
		},
		methods:{
		     
			
		}
	}
</script>

<style>
.address{
        background-color: rgba(0, 0, 0, 0.3);
		text-overflow: ellipsis;
		overflow: hidden;
		padding: 5rpx 10rpx;
		white-space: normal;
		border-radius: 50%;
		display: flex;
		flex-direction: row;
}
.address_text{
		font-size: 28rpx;
		color: #FFF;
}
</style>